import { getRandomDateTime, getNowDate, getFeatureDate } from '../../../utils'
import Mock from 'mockjs'
export const operateLogMock = pageSize => {
  const result: any[] = []
  for (let i = 0; i < pageSize; i++) {
    result.push({
      id: i + 1,
      username: '@cname()',
      nickname: '@cname()',
      userIp: Mock.Random.ip(),
      userId: Mock.mock('@natural(1, 1000)'),
      'agent|1': ['google', 'edge', 'ie', 'mac'],
      'module|1': ['字典管理', '用户管理', '部门管理', '菜单管理', '岗位管理', '角色管理', '租户管理', '租户套餐', '短息管理'],
      type: Mock.mock('@integer(0, 10)'),
      content: '「谁」在「什么时间」对「什么对象」做了「什么事情」',
      extra: Mock.Random.word(5, 12),
      'requestMethod|1': ['post', 'get', 'delete', 'put'],
      requestUrl: Mock.mock('@url'),
      creator: '1',
      create_time: getRandomDateTime(getFeatureDate(-10), getNowDate()),
      updater: '',
      update_time: '',
      deleted: false,
      deleted_time: ''
    })
  }
  return result
}
